<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Please Log In</title>
</head>
<body>
<h1>欢迎回来:</h1>
<p th:text="${username}"></p>
<button onclick="logout()">注销</button>
</body>
<script>
    function logout() {
        var xmlHttpRequest = new XMLHttpRequest();
        xmlHttpRequest.open("POST","/logout",true);
        xmlHttpRequest.send();
    }
</script>
</html>